﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/AdminMaster.Master" AutoEventWireup="true"
    CodeBehind="AdminPosition.aspx.cs" Inherits="TravelLink.WebApp.Admin.AdminPosition" %>

<%@ Register Assembly="DevExpress.Web.ASPxGridView.v11.1, Version=11.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxEditors.v11.1, Version=11.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.ASPxGridView.v11.1.Export, Version=11.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxGridView.Export" TagPrefix="dx" %>
<%@ Register Assembly="DevExpress.Web.v11.1, Version=11.1.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
    Namespace="DevExpress.Web.ASPxPopupControl" TagPrefix="dx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
    <script type="text/javascript">
var rid;
function CallServer()
{
var rowid = rid+"|1";
<%= ClientScript.GetCallbackEventReference(this, "rowid", "ReceiveServerData",null)%>;
}

function CallServerHot()
{
var rowid=rid+"|2";
<%= ClientScript.GetCallbackEventReference(this,"rowid","ReceiveServerData",null) %>
} 

function ReceiveServerData(rValue)
{
    if(rValue=='')
    {
    alert('操作成功');
    }
    else
    {
    alert(rValue);
    }
}
    </script>
    <style type="text/css">
        .style1
        {
            width: 920px;
        }
        
        .req
        {
            color: Red;
            font: 700 12px/35px;
        }
        .label
        {
            width: 150px;
            border: 1px solid #DCDCDC;
            text-align: left;
            font: 12px;
            font-weight: 600;
            height: 30px;
            padding-left: 2px;
        }
        .input
        {
            border: 1px solid #DCDCDC;
            background-color: #DCDCDC;
            width: 200px;
            text-align: center;
            height: 35px;
        }
        .style2
        {
            width: 100%;
        }
    </style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
        <Services>
            <asp:ServiceReference Path="AdminWebService.asmx" />
        </Services>
    </asp:ScriptManager>
    <table cellpadding="0" cellspacing="0" class="style1">
        <tr>
            <td>
                <table class="style1">
                    <tr>
                        <td>
                            <dx:ASPxLabel ID="ASPxLabel1" runat="server" Text="发布时间从：">
                            </dx:ASPxLabel>
                        </td>
                        <td>
                            <dx:ASPxDateEdit ID="adefrom" runat="server">
                            </dx:ASPxDateEdit>
                        </td>
                        <td>
                            <dx:ASPxLabel ID="ASPxLabel2" runat="server" Text="至：">
                            </dx:ASPxLabel>
                        </td>
                        <td>
                            <dx:ASPxDateEdit ID="adeto" runat="server">
                            </dx:ASPxDateEdit>
                        </td>
                        <td>
                            <dx:ASPxLabel ID="ASPxLabel3" runat="server" Text="关键字：">
                            </dx:ASPxLabel>
                        </td>
                        <td>
                            <dx:ASPxTextBox ID="atbkey" runat="server" Width="150px">
                            </dx:ASPxTextBox>
                        </td>
                        <td>
                            <dx:ASPxLabel ID="ASPxLabel7" runat="server" Text="公司：">
                            </dx:ASPxLabel>
                        </td>
                        <td>
                            <dx:ASPxComboBox ID="cbxCompany" runat="server" DataSourceID="LinqDataSource2" TextField="CompanyName"
                                ValueField="CompanyCode" ValueType="System.Guid" OnDataBound="cbxCompany_DataBound">
                            </dx:ASPxComboBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <dx:ASPxLabel ID="ASPxLabel4" runat="server" Text="有效期从：">
                            </dx:ASPxLabel>
                        </td>
                        <td>
                            <dx:ASPxDateEdit ID="aspPeroidBegin" runat="server">
                            </dx:ASPxDateEdit>
                        </td>
                        <td>
                            <dx:ASPxLabel ID="ASPxLabel5" runat="server" Text="至：">
                            </dx:ASPxLabel>
                        </td>
                        <td>
                            <dx:ASPxDateEdit ID="aspPeroidEnd" runat="server">
                            </dx:ASPxDateEdit>
                        </td>
                        <td>
                            <dx:ASPxLabel ID="ASPxLabel6" runat="server" Text="职位类别：">
                            </dx:ASPxLabel>
                        </td>
                        <td>
                            <dx:ASPxComboBox ID="cmxPositionType" runat="server" DataSourceID="LinqDataSource3"
                                TextField="Name" ValueField="Idx" ValueType="System.Int32" OnDataBound="cmxPositionType_DataBound"
                                Width="150px">
                                <Items>
                                    <dx:ListEditItem Text="全部" Value="0" />
                                </Items>
                            </dx:ASPxComboBox>
                        </td>
                        <td align="center" colspan="2">
                            <table>
                                <tr>
                                    <td>
                                        <dx:ASPxButton ID="abtnExport" runat="server" OnClick="abtnExport_Click" Text="导出excel">
                                        </dx:ASPxButton>
                                    </td>
                                    <td>
                                        <dx:ASPxButton ID="btnSerach" Width="70" runat="server" Text="搜索" OnClick="btnSerach_Click">
                                        </dx:ASPxButton>
                                    </td>
                                    <td>
                                        <dx:ASPxButton ID="btnNew" Width="70" runat="server" Text="新增" AutoPostBack="False">
                                            <ClientSideEvents Click="function(s,e){ agvcompany.AddNewRow();}" />
                                        </dx:ASPxButton>
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>
                <dx:ASPxGridView ID="ASPxGridView1" runat="server" Width="931px" AutoGenerateColumns="False"
                    DataSourceID="LinqDataSource1" KeyFieldName="PositionCode" ClientInstanceName="agvcompany"
                    EnableViewState="False" OnRowDeleted="ASPxGridView1_RowDeleted" OnRowDeleting="ASPxGridView1_RowDeleting"
                    OnRowInserted="ASPxGridView1_RowInserted" OnRowInserting="ASPxGridView1_RowInserting"
                    OnRowUpdated="ASPxGridView1_RowUpdated" OnRowUpdating="ASPxGridView1_RowUpdating">
                 
                    <SettingsBehavior ColumnResizeMode="Disabled" ConfirmDelete="true" />
                    <ClientSideEvents CustomButtonClick="function(s, e) {
	rid=e.visibleIndex;
	if(e.buttonID=='btnrecommand')
	{
	popuser.Show();
	}
	else
	{
	CallServerHot();
	}
}" />
                    <Columns>
                        <dx:GridViewCommandColumn ButtonType="Button" Caption="操作" VisibleIndex="30">
                            <EditButton Text="查看" Visible="True">
                            </EditButton>
                            <NewButton Text="添加" Visible="true">
                            </NewButton>
                            <DeleteButton Text="删除" Visible="True">
                            </DeleteButton>
                            <CancelButton Text="取消" Visible="True">
                            </CancelButton>
                            <UpdateButton Text="保存" Visible="True">
                            </UpdateButton>
                            <CustomButtons>
                                <dx:GridViewCommandColumnCustomButton Text="推荐" ID="btnrecommand">
                                </dx:GridViewCommandColumnCustomButton>
                                <dx:GridViewCommandColumnCustomButton ID="btnhot" Text="热门">
                                </dx:GridViewCommandColumnCustomButton>
                            </CustomButtons>
                        </dx:GridViewCommandColumn>
                        <dx:GridViewDataTextColumn Caption="企业名称" FieldName="CompanyName" ReadOnly="True"
                            VisibleIndex="0" Width="130px">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="企业编号" FieldName="CompanyCode" 
                            VisibleIndex="0" ReadOnly="True">
                            <PropertiesTextEdit DisplayFormatString="{0}">
                            </PropertiesTextEdit>
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="职位名称" FieldName="PositionName" VisibleIndex="4"
                            Width="80px">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="Name" Caption="职位类别" VisibleIndex="2">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="CityName" Caption="工作城市" VisibleIndex="5">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="Number" Caption="招聘人数" VisibleIndex="5">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="收藏数量" FieldName="CollectCount" VisibleIndex="5"
                            Width="50px">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="申请数量" FieldName="ApplyCount" VisibleIndex="5"
                            Width="50px">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="部门" FieldName="Department" VisibleIndex="3" Width="100px">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="入职时间" FieldName="LimtDate" VisibleIndex="5" Width="100px">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="PositionLevel" Visible="False" VisibleIndex="7">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="PositionType" Visible="False" VisibleIndex="8">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="Description" Visible="False" VisibleIndex="9">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="Requirement" Visible="False" VisibleIndex="10">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="WorkInCityId" Visible="False" VisibleIndex="11">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="WorkTypeId" Visible="False" VisibleIndex="14">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="Salary" Visible="False" VisibleIndex="13">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn FieldName="OtherInfo" Visible="False" VisibleIndex="15">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataDateColumn FieldName="PublishDate" Visible="true" Caption="发布时间"
                            VisibleIndex="28">
                        </dx:GridViewDataDateColumn>
                        <dx:GridViewDataDateColumn FieldName="PeriodTo" Caption="有效期" Visible="true" VisibleIndex="12">
                        </dx:GridViewDataDateColumn>
                        <dx:GridViewDataTextColumn Caption="状态" FieldName="Status" Visible="False" VisibleIndex="5"
                            Width="120px">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataTextColumn Caption="状态" FieldName="StatusName" VisibleIndex="6" Width="80px">
                        </dx:GridViewDataTextColumn>
                        <dx:GridViewDataHyperLinkColumn Caption="职位编号" FieldName="PositionCode" 
                            VisibleIndex="1">
                            <PropertiesHyperLinkEdit NavigateUrlFormatString="AdminUserPositionCollect.aspx?PositionCode={0}">
                            </PropertiesHyperLinkEdit>
                        </dx:GridViewDataHyperLinkColumn>
                    </Columns>
                    <Templates>
                        <EditForm>
                            <table width="700px" style="margin: 10px; border-bottom: 1px solid #DCDCDC;" cellpadding="0"
                                cellspacing="5">
                                <tr>
                                    <td class="label">
                                        <span class="req">*</span> 企业名称:
                                    </td>
                                    <td class="input">
                                        <dx:ASPxComboBox ID="ASPxComboBox1" runat="server" DataSourceID="LinqDataSource2"
                                            TextField="CompanyName" Value='<%# Bind("CompanyCode") %>' ValueField="CompanyCode"
                                            ValueType="System.Guid">
                                        </dx:ASPxComboBox>
                                        <asp:HiddenField ID="hidPositionCode" runat="server" Value='<%#Bind("PositionCode") %>' />
                                    </td>
                                    <td class="label">
                                        <span class="req">*</span>职位名称:
                                    </td>
                                    <td class="input">
                                        <dx:ASPxTextBox ID="txtPostionName" Text='<%# Bind("PositionName") %>' Width="80%"
                                            runat="server">
                                            <ValidationSettings Display="Dynamic" ErrorDisplayMode="ImageWithTooltip">
                                                <RequiredField ErrorText="请输入职位名称" IsRequired="true" />
                                            </ValidationSettings>
                                        </dx:ASPxTextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="label">
                                        <span class="req">*</span> 招聘人数:
                                    </td>
                                    <td class="input">
                                        <dx:ASPxTextBox ID="txtNumber" Text='<%# Bind("Number") %>' Width="80%" runat="server">
                                            <ValidationSettings Display="Dynamic" ErrorDisplayMode="ImageWithTooltip">
                                                <RequiredField ErrorText="请输入招聘人数" IsRequired="true" />
                                            </ValidationSettings>
                                        </dx:ASPxTextBox>
                                    </td>
                                    <td class="label">
                                        <span class="req">*</span> 职位类型:
                                    </td>
                                    <td class="input">
                                        <dx:ASPxComboBox ID="cbxPositionType" DataSourceID="LinqDataSource3" TextField="Name"
                                            ValueField="Idx" ValueType="System.Int32" runat="server" Value='<%# Bind("PositionType") %>'
                                            Width="80%">
                                            <ValidationSettings Display="Dynamic" ErrorDisplayMode="ImageWithTooltip">
                                                <RequiredField ErrorText="请选择职位类型" IsRequired="true" />
                                            </ValidationSettings>
                                        </dx:ASPxComboBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="label">
                                        所属部门:
                                    </td>
                                    <td class="input">
                                        <dx:ASPxTextBox ID="txtDepartment" Text='<%#Bind("Department") %>' Width="80%" runat="server">
                                        </dx:ASPxTextBox>
                                    </td>
                                    <td class="label">
                                        职位级别:
                                    </td>
                                    <td class="input">
                                        <dx:ASPxComboBox ID="cmdPositionLevel" runat="server" TextField="Name" ValueField="Idx"
                                            ValueType="System.Int32" Value='<%# Bind("PositionLevel") %>' Width="80%" DataSourceID="LinqDataSource5">
                                        </dx:ASPxComboBox>
                                        <asp:LinqDataSource ID="LinqDataSource5" runat="server" ContextTypeName="TravelLink.DAL.TravelLinkDBDataContext"
                                            EntityTypeName="" Select="new (Idx, Name)" TableName="TL_PositionLevel">
                                        </asp:LinqDataSource>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="label">
                                        入职时间:
                                    </td>
                                    <td class="input">
                                        <dx:ASPxTextBox ID="txtLimtDate" Text='<%#Bind("LimtDate") %>' Width="80%" runat="server">
                                        </dx:ASPxTextBox>
                                    </td>
                                    <td class="label">
                                        工作类型:
                                    </td>
                                    <td class="input">
                                        <dx:ASPxComboBox ID="cbxWorkTypeId" TextField="Name" ValueField="Idx" ValueType="System.Int32"
                                            runat="server" Value='<%# Bind("WorkTypeId") %>' Width="80%" DataSourceID="LinqDataSource4">
                                        </dx:ASPxComboBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="label">
                                        工作城市:
                                    </td>
                                    <td class="input">
                                        <dx:ASPxComboBox ID="cbxCity" TextField="CName" ValueField="Idx" ValueType="System.Int32"
                                            runat="server" Value='<%# Bind("WorkInCityId") %>' Width="80%" DataSourceID="LinqDataSource6">
                                        </dx:ASPxComboBox>
                                    </td>
                                    <td class="label">
                                        期望薪资:
                                    </td>
                                    <td class="input">
                                        <dx:ASPxTextBox ID="txtSalary" Text='<%#Bind("Salary") %>' Width="80%" runat="server">
                                        </dx:ASPxTextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="label">
                                        <span class="req">*</span> 职位状态:
                                    </td>
                                    <td class="input">
                                        <dx:ASPxComboBox ID="cbxStatus" runat="server" ValueType="System.Int32" Value='<%# Bind("Status") %>'
                                            Width="80%">
                                            <Items>
                                                <dx:ListEditItem Text="停止" Value="-1" />
                                                <dx:ListEditItem Text="发布" Value="0" />
                                                <dx:ListEditItem Text="推荐" Value="1" />
                                            </Items>
                                            <ValidationSettings Display="Dynamic" ErrorDisplayMode="ImageWithTooltip">
                                                <RequiredField ErrorText="请选择职位状态" IsRequired="true" />
                                            </ValidationSettings>
                                        </dx:ASPxComboBox>
                                    </td>
                                    <td class="label">
                                        <span class="req">*</span> 职位有效期至:
                                    </td>
                                    <td class="input">
                                        <dx:ASPxDateEdit ID="txtPeriodTo" runat="server" Width="80%" Date='<%#Eval("PeriodTo")==null?DateTime.Now:((DateTime)Eval("PeriodTo")) %>'>
                                            <ValidationSettings Display="Dynamic" ErrorDisplayMode="ImageWithTooltip">
                                                <RequiredField ErrorText="请选择职位有效期" IsRequired="true" />
                                            </ValidationSettings>
                                        </dx:ASPxDateEdit>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="label">
                                        汇报对象:
                                    </td>
                                    <td class="input" colspan="3" style="width: 480px;">
                                       <dx:ASPxTextBox ID="atbReportTo" Text='<%#Bind("ReportTo") %>' Width="80%" runat="server">
                                        </dx:ASPxTextBox>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="label">
                                        招聘要求:
                                    </td>
                                    <td class="input" colspan="3" style="width: 480px;">
                                        <dx:ASPxMemo ID="txtRequirement" Height="80" Text='<%#Bind("Requirement") %>' Width="90%"
                                            runat="server">
                                        </dx:ASPxMemo>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="label">
                                        职位描述:
                                    </td>
                                    <td class="input" colspan="3" style="width: 480px;">
                                        <dx:ASPxMemo ID="txtDescription" Height="120" Text='<%#Bind("Description") %>' Width="90%"
                                            runat="server">
                                        </dx:ASPxMemo>
                                    </td>
                                </tr>
                                <tr>
                                    <td class="label">
                                        其他信息:
                                    </td>
                                    <td class="input" colspan="3" style="width: 480px;">
                                        <dx:ASPxMemo ID="txtOtherInfo" Height="80" Text='<%#Bind("OtherInfo") %>' Width="90%"
                                            runat="server">
                                        </dx:ASPxMemo>
                                    </td>
                                </tr>
                                <tr>
                                    <td align="right" colspan="2" style="width: 350px;">
                                        <dx:ASPxButton ID="btnSave" runat="server" Text="保存" Width="120" OnClick="btnSave_Click">
                                        </dx:ASPxButton>
                                    </td>
                                    <td align="left" colspan="2" style="width: 350px;">
                                        <dx:ASPxButton ID="btnCancel" runat="server" Text="取消" AutoPostBack="false" Width="120">
                                            <ClientSideEvents Click="function(s,e){agvcompany.CancelEdit();}" />
                                        </dx:ASPxButton>
                                    </td>
                                </tr>
                            </table>
                        </EditForm>
                    </Templates>
                    <SettingsEditing Mode="PopupEditForm" PopupEditFormModal="True" PopupEditFormHorizontalAlign="WindowCenter"
                        PopupEditFormVerticalAlign="WindowCenter" />
                    <SettingsText PopupEditFormCaption="职位信息" ConfirmDelete="是否删除选择的记录?" />
                </dx:ASPxGridView>
                <asp:LinqDataSource ID="LinqDataSource1" runat="server" ContextTypeName="TravelLink.DAL.TravelLinkDBDataContext"
                    EnableViewState="true" EntityTypeName="" OrderBy="PublishDate desc" TableName="View_CompanyPosition">
                </asp:LinqDataSource>
                <asp:LinqDataSource ID="LinqDataSource6" runat="server" ContextTypeName="TravelLink.DAL.TravelLinkDBDataContext"
                    EntityTypeName="" Select="new (Idx, CName)" TableName="TL_City">
                </asp:LinqDataSource>
                <asp:LinqDataSource ID="LinqDataSource3" runat="server" ContextTypeName="TravelLink.DAL.TravelLinkDBDataContext"
                    EntityTypeName="" Select="new (Idx, Name)" TableName="TL_PositionType">
                </asp:LinqDataSource>
                <asp:LinqDataSource ID="LinqDataSource2" runat="server" ContextTypeName="TravelLink.DAL.TravelLinkDBDataContext"
                    EntityTypeName="" TableName="TL_Company">
                </asp:LinqDataSource>
                <asp:LinqDataSource ID="LinqDataSource4" runat="server" ContextTypeName="TravelLink.DAL.TravelLinkDBDataContext"
                    EntityTypeName="" Select="new (Idx, Name)" TableName="TL_WorkType">
                </asp:LinqDataSource>
                <dx:ASPxGridViewExporter ID="ASPxGridViewExporter1" runat="server" GridViewID="ASPxGridView1">
                </dx:ASPxGridViewExporter>
                <dx:ASPxPopupControl ID="ASPxPopupControl1" runat="server" ClientInstanceName="popuser"
                    HeaderText="职位推荐" Modal="True" PopupHorizontalAlign="WindowCenter" PopupVerticalAlign="WindowCenter">
                    <ContentCollection>
                        <dx:PopupControlContentControl ID="PopupControlContentControl1" runat="server" SupportsDisabledAttribute="True">
                            <asp:Panel ID="Panel1" runat="server">
                                <table class="style2">
                                    <tr>
                                        <td>
                                            <table class="style2">
                                                <tr>
                                                    <td>
                                                        <dx:ASPxLabel ID="ASPxLabel8" runat="server" Text="用户编号：">
                                                        </dx:ASPxLabel>
                                                    </td>
                                                    <td>
                                                        <dx:ASPxTextBox ID="atbusercode" runat="server" Width="300px">
                                                        </dx:ASPxTextBox>
                                                    </td>
                                                    <td>
                                                        <dx:ASPxLabel ID="ASPxLabel10" runat="server" Text="邮箱：">
                                                        </dx:ASPxLabel>
                                                    </td>
                                                    <td>
                                                        <dx:ASPxTextBox ID="atbusermail" runat="server" Width="300px">
                                                        </dx:ASPxTextBox>
                                                    </td>
                                                    <td>
                                                        <dx:ASPxButton ID="btnSerachUser" runat="server" OnClick="btnSerachUser_Click" Text="搜索"
                                                            Width="70px">
                                                        </dx:ASPxButton>
                                                    </td>
                                                </tr>
                                                <tr>
                                                    <td>
                                                        <dx:ASPxLabel ID="ASPxLabel9" runat="server" Text="手机：">
                                                        </dx:ASPxLabel>
                                                    </td>
                                                    <td>
                                                        <dx:ASPxTextBox ID="atbusermobile" runat="server" Width="300px">
                                                        </dx:ASPxTextBox>
                                                    </td>
                                                    <td>
                                                        &nbsp;
                                                    </td>
                                                    <td>
                                                        &nbsp;
                                                    </td>
                                                    <td>
                                                        <dx:ASPxButton ID="btnSendMail" runat="server" Text="推荐" Width="70px" 
                                                            AutoPostBack="False">
                                                            <ClientSideEvents Click="function(s, e) {
	CallServer();
}" />
                                                        </dx:ASPxButton>
                                                    </td>
                                                </tr>
                                            </table>
                                        </td>
                                    </tr>
                                    <tr>
                                        <td>
                                            <dx:ASPxGridView ID="ASPxGridView2" runat="server" AutoGenerateColumns="False" ClientInstanceName="ASPxGridView2"
                                                DataSourceID="ldsUser" EnableViewState="False" KeyFieldName="UserCode" Width="931px">
                                                <Columns>
                                                    <dx:GridViewDataTextColumn Caption="编号" FieldName="UserCode" ReadOnly="True" ShowInCustomizationForm="True"
                                                        VisibleIndex="1">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn Caption="邮箱" FieldName="Email" ShowInCustomizationForm="True"
                                                        VisibleIndex="5">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn Caption="姓" FieldName="CLastName" ShowInCustomizationForm="True"
                                                        VisibleIndex="2">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn Caption="名" FieldName="CFirstName" ShowInCustomizationForm="True"
                                                        VisibleIndex="3">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn Caption="手机" FieldName="Mobile" ShowInCustomizationForm="True"
                                                        VisibleIndex="10">
                                                    </dx:GridViewDataTextColumn>
                                                    <dx:GridViewDataTextColumn Caption="电话" FieldName="Tel" ShowInCustomizationForm="True"
                                                        VisibleIndex="14">
                                                    </dx:GridViewDataTextColumn>
                                                </Columns>
                                                <SettingsBehavior ConfirmDelete="True" />
                                                <SettingsEditing Mode="PopupEditForm" PopupEditFormHorizontalAlign="WindowCenter"
                                                    PopupEditFormModal="True" PopupEditFormVerticalAlign="WindowCenter" />
                                                <SettingsText ConfirmDelete="是否删除选择的记录?" PopupEditFormCaption="职位信息" />
                                                <SettingsDetail AllowOnlyOneMasterRowExpanded="True" />
                                                <Templates>
                                                    <DetailRow>
                                                        ss
                                                    </DetailRow>
                                                    <EditForm>
                                                        <table cellpadding="0" cellspacing="5" style="margin: 10px; border-bottom: 1px solid #DCDCDC;"
                                                            width="700px">
                                                            <tr>
                                                                <td class="label">
                                                                    <span class="req">*</span> 企业名称:
                                                                </td>
                                                                <td class="input">
                                                                    <dx:ASPxComboBox ID="cbxCompany0" runat="server" DataSourceID="LinqDataSource2" TextField="CompanyName"
                                                                        Value='<%#Bind("CompanyCode") %>' ValueField="CompanyCode" ValueType="System.Guid">
                                                                        <ValidationSettings Display="Dynamic" ErrorDisplayMode="ImageWithTooltip">
                                                                            <RequiredField ErrorText="请选择企业" IsRequired="true" />
                                                                        </ValidationSettings>
                                                                    </dx:ASPxComboBox>
                                                                    <asp:HiddenField ID="hidPositionCode0" runat="server" Value='<%#Bind("PositionCode") %>' />
                                                                </td>
                                                                <td class="label">
                                                                    <span class="req">*</span>职位名称:
                                                                </td>
                                                                <td class="input">
                                                                    <dx:ASPxTextBox ID="txtPostionName0" runat="server" Text='<%# Bind("PositionName") %>'
                                                                        Width="80%">
                                                                        <ValidationSettings Display="Dynamic" ErrorDisplayMode="ImageWithTooltip">
                                                                            <RequiredField ErrorText="请输入职位名称" IsRequired="true" />
                                                                        </ValidationSettings>
                                                                    </dx:ASPxTextBox>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td class="label">
                                                                    <span class="req">*</span> 招聘人数:
                                                                </td>
                                                                <td class="input">
                                                                    <dx:ASPxTextBox ID="txtNumber0" runat="server" Text='<%# Bind("Number") %>' Width="80%">
                                                                        <ValidationSettings Display="Dynamic" ErrorDisplayMode="ImageWithTooltip">
                                                                            <RequiredField ErrorText="请输入招聘人数" IsRequired="true" />
                                                                        </ValidationSettings>
                                                                    </dx:ASPxTextBox>
                                                                </td>
                                                                <td class="label">
                                                                    <span class="req">*</span> 职位类型:
                                                                </td>
                                                                <td class="input">
                                                                    <dx:ASPxComboBox ID="cbxPositionType0" runat="server" DataSourceID="LinqDataSource3"
                                                                        TextField="Name" Value='<%# Bind("PositionType") %>' ValueField="Idx" ValueType="System.Int32"
                                                                        Width="80%">
                                                                        <ValidationSettings Display="Dynamic" ErrorDisplayMode="ImageWithTooltip">
                                                                            <RequiredField ErrorText="请选择职位类型" IsRequired="true" />
                                                                        </ValidationSettings>
                                                                    </dx:ASPxComboBox>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td class="label">
                                                                    所属部门:
                                                                </td>
                                                                <td class="input">
                                                                    <dx:ASPxTextBox ID="txtDepartment0" runat="server" Text='<%#Bind("Department") %>'
                                                                        Width="80%">
                                                                    </dx:ASPxTextBox>
                                                                </td>
                                                                <td class="label">
                                                                    职位级别:
                                                                </td>
                                                                <td class="input">
                                                                    <dx:ASPxComboBox ID="cmdPositionLevel0" runat="server" DataSourceID="LinqDataSource7"
                                                                        TextField="Name" Value='<%# Bind("PositionLevel") %>' ValueField="Idx" ValueType="System.Int32"
                                                                        Width="80%">
                                                                    </dx:ASPxComboBox>
                                                                    <asp:LinqDataSource ID="LinqDataSource7" runat="server" ContextTypeName="TravelLink.DAL.TravelLinkDBDataContext"
                                                                        EntityTypeName="" Select="new (Idx, Name)" TableName="TL_PositionLevel">
                                                                    </asp:LinqDataSource>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td class="label">
                                                                    入职时间:
                                                                </td>
                                                                <td class="input">
                                                                    <dx:ASPxTextBox ID="txtLimtDate0" runat="server" Text='<%#Bind("LimtDate") %>' Width="80%">
                                                                    </dx:ASPxTextBox>
                                                                </td>
                                                                <td class="label">
                                                                    工作类型:
                                                                </td>
                                                                <td class="input">
                                                                    <dx:ASPxComboBox ID="cbxWorkTypeId0" runat="server" DataSourceID="LinqDataSource4"
                                                                        TextField="Name" Value='<%# Bind("WorkTypeId") %>' ValueField="Idx" ValueType="System.Int32"
                                                                        Width="80%">
                                                                    </dx:ASPxComboBox>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td class="label">
                                                                    工作城市:
                                                                </td>
                                                                <td class="input">
                                                                    <dx:ASPxComboBox ID="cbxCity0" runat="server" DataSourceID="LinqDataSource6" TextField="CName"
                                                                        Value='<%# Bind("WorkInCityId") %>' ValueField="Idx" ValueType="System.Int32"
                                                                        Width="80%">
                                                                    </dx:ASPxComboBox>
                                                                </td>
                                                                <td class="label">
                                                                    期望薪资:
                                                                </td>
                                                                <td class="input">
                                                                    <dx:ASPxTextBox ID="txtSalary0" runat="server" Text='<%#Bind("Salary") %>' Width="80%">
                                                                    </dx:ASPxTextBox>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td class="label">
                                                                    <span class="req">*</span> 职位状态:
                                                                </td>
                                                                <td class="input">
                                                                    <dx:ASPxComboBox ID="cbxStatus0" runat="server" Value='<%# Bind("Status") %>' ValueType="System.Int32"
                                                                        Width="80%">
                                                                        <Items>
                                                                            <dx:ListEditItem Text="停止" Value="-1" />
                                                                            <dx:ListEditItem Text="发布" Value="0" />
                                                                            <dx:ListEditItem Text="推荐" Value="1" />
                                                                        </Items>
                                                                        <ValidationSettings Display="Dynamic" ErrorDisplayMode="ImageWithTooltip">
                                                                            <RequiredField ErrorText="请选择职位状态" IsRequired="true" />
                                                                        </ValidationSettings>
                                                                    </dx:ASPxComboBox>
                                                                </td>
                                                                <td class="label">
                                                                    <span class="req">*</span> 职位有效期至:
                                                                </td>
                                                                <td class="input">
                                                                    <dx:ASPxDateEdit ID="txtPeriodTo0" runat="server" Date='<%#Eval("PeriodTo")==null?DateTime.Now:((DateTime)Eval("PeriodTo")) %>'
                                                                        Width="80%">
                                                                        <ValidationSettings Display="Dynamic" ErrorDisplayMode="ImageWithTooltip">
                                                                            <RequiredField ErrorText="请选择职位有效期" IsRequired="true" />
                                                                        </ValidationSettings>
                                                                    </dx:ASPxDateEdit>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td class="label">
                                                                    招聘要求:
                                                                </td>
                                                                <td class="input" colspan="3" style="width: 480px;">
                                                                    <dx:ASPxMemo ID="txtRequirement0" runat="server" Height="80" Text='<%#Bind("Requirement") %>'
                                                                        Width="90%">
                                                                    </dx:ASPxMemo>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td class="label">
                                                                    职位描述:
                                                                </td>
                                                                <td class="input" colspan="3" style="width: 480px;">
                                                                    <dx:ASPxMemo ID="txtDescription0" runat="server" Height="120" Text='<%#Bind("Description") %>'
                                                                        Width="90%">
                                                                    </dx:ASPxMemo>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td class="label">
                                                                    其他信息:
                                                                </td>
                                                                <td class="input" colspan="3" style="width: 480px;">
                                                                    <dx:ASPxMemo ID="txtOtherInfo0" runat="server" Height="80" Text='<%#Bind("OtherInfo") %>'
                                                                        Width="90%">
                                                                    </dx:ASPxMemo>
                                                                </td>
                                                            </tr>
                                                            <tr>
                                                                <td align="right" colspan="2" style="width: 350px;">
                                                                    <dx:ASPxButton ID="btnSave0" runat="server" OnClick="btnSave_Click" Text="保存" Width="120">
                                                                    </dx:ASPxButton>
                                                                </td>
                                                                <td align="left" colspan="2" style="width: 350px;">
                                                                    <dx:ASPxButton ID="btnCancel0" runat="server" AutoPostBack="false" Text="取消" Width="120">
                                                                        <ClientSideEvents Click="function(s,e){agvcompany.CancelEdit();}" />
                                                                    </dx:ASPxButton>
                                                                </td>
                                                            </tr>
                                                        </table>
                                                    </EditForm>
                                                </Templates>
                                            </dx:ASPxGridView>
                                            <asp:LinqDataSource ID="ldsUser" runat="server" ContextTypeName="TravelLink.DAL.TravelLinkDBDataContext"
                                                EntityTypeName="" TableName="TL_User">
                                            </asp:LinqDataSource>
                                        </td>
                                    </tr>
                                </table>
                            </asp:Panel>
                        </dx:PopupControlContentControl>
                    </ContentCollection>
                </dx:ASPxPopupControl>
            </td>
        </tr>
    </table>
</asp:Content>
